package com.ln.dm1107.demo02;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/11/7 16:17
 */
public class Teacher {
    private static Teacher teacher;

    private Teacher(){}

    public static Teacher getInstance() {
        if (teacher == null) {
            synchronized (Teacher.class) {
                if (teacher == null) {
                    teacher = new Teacher();
                }

            }
        }
        return teacher;
    }
}
